package com.kaimary.smartinteract.spark;

import org.apache.spark.sql.SparkSession;

public class SparkConfig {

    public static SparkSession getSession() {
        SparkSession spark = SparkSession
                .builder()
                .appName("interfacing spark sql to hive metastore without configuration file")
                .master("spark://10.141.212.118:7077")
                .config("hive.metastore.uris", "thrift://10.141.212.118:9083")
                .enableHiveSupport()
                .getOrCreate();
        spark.sql("use bigbench");
        return spark;
    }
}
